//
//  YSLoadingViewController.m
//  YSKitDemo
//
//  Created by MOLBASE on 2018/8/15.
//  Copyright © 2018年 YangShen. All rights reserved.
//

#import "YSLoadingViewController.h"
#import "YSLoadingView.h"
#import "YSProgressLoadingView.h"
#import "YSTieBarLoadingView.h"

@interface YSLoadingViewController ()

@end

@implementation YSLoadingViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    CGFloat space = 60;
    CGFloat w = 60;
    CGFloat h = 60;
    CGFloat x = (self.view.ys_width - space - 2*w) / 2;
    CGFloat y = 100;

    YSProgressLoadingView *loading1 = [YSProgressLoadingView loadingViewWithFrame:CGRectMake(x, y, w, h) style:YSProgressLoadingStyleCircle];
    loading1.backgroundColor = [UIColor ys_randomColor];
    loading1.progress = 0.6;
    [self.view addSubview:loading1];

    YSLoadingView *loading2 = [YSLoadingView loadingViewWithFrame:CGRectMake(x+space+w, y, w, h) style:YSLoadingStyleCircle];
    loading2.backgroundColor = [UIColor ys_randomColor];
    [loading2 startLoading];
    [self.view addSubview:loading2];

    YSLoadingView *loading3 = [YSLoadingView loadingViewWithFrame:CGRectMake(x, y+space+h, w, h) style:YSLoadingStyleCircleMask];
    loading3.backgroundColor = [UIColor ys_randomColor];
    [loading3 startLoading];
    [self.view addSubview:loading3];

//    YSLoadingView *loading4 = [YSLoadingView loadingViewWithFrame:CGRectMake(x+w+space, y+space+h, w, h) style:YSLoadingStyleCircleTrain];
//    loading4.backgroundColor = [UIColor ys_randomColor];
//    [loading4 startLoading];
//    [self.view addSubview:loading4];

    YSTieBarLoadingView *loading11 = [[YSTieBarLoadingView alloc] initWithFrame:CGRectMake(x+(w+space), y+(h+space)*2, w, h)];
    [loading11 show];
    [self.view addSubview:loading11];


}


@end
